﻿#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import os
import sys
import unittest

import framework

if __name__ == '__main__':
    execfile(os.path.join(sys.path[0], 'framework.py'))

    testRunner = unittest.TextTestRunner(verbosity=1)
    testLoader = unittest.TestLoader()
    for testfile in os.listdir(framework.TESTDIR):
        if testfile.startswith('test_') and testfile.endswith('.py'):
            filename = testfile.split('.')[0] # remove .py from testfile because testLoader will add .py to name
            suite = testLoader.loadTestsFromName(filename)
            testRunner.run(suite)